home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / toogl / regex.h < prev    next >
C/C++ Source or Header  |  1996-11-11  |  2KB  |  54 lines

  1. /*
  2.  * Copyright (c) 1992, 1993 Silicon Graphics, Inc.
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name of
  8.  * Silicon Graphics may not be used in any advertising or publicity relating 
  9.  * to the software without the specific, prior written permission of 
  10.  * Silicon Graphics.
  11.  *
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
  13.  * ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, 
  14.  * ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  15.  *
  16.  * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, 
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER 
  18.  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF 
  19.  * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT 
  20.  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21.  */
  22.  
  23. /*
  24.  * Definitions etc. for regexp(3) routines.
  25.  *
  26.  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  27.  * not the System V one.
  28.  */
  29. #define NSUBEXP  10
  30. typedef struct regexp {
  31.     char *startp[NSUBEXP];
  32.     char *endp[NSUBEXP];
  33.     char regstart;        /* Internal use only. */
  34.     char reganch;        /* Internal use only. */
  35.     char *regmust;        /* Internal use only. */
  36.     int regmlen;        /* Internal use only. */
  37.     char program[1];    /* Unwarranted chumminess with compiler. */
  38. } regexp;
  39.  
  40. /*
  41.  * c++ headers added by Jim Morris.
  42.  */
  43. #ifdef    __cplusplus
  44. extern "C"{
  45. regexp *regcomp(const char *);
  46. int regexec(regexp *, const char *);
  47. }
  48. #else
  49. extern regexp *regcomp();
  50. extern int regexec();
  51. extern void regsub();
  52. extern void regerror();
  53. #endif
  54.